package cutetd.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

public class AdminAction extends ActionSupport  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public String execute() throws Exception {
		HttpServletRequest request = ServletActionContext.getRequest();
		HttpSession session = request.getSession();
		if (session.getAttribute("email") == null || session.getAttribute("email").equals("") ||
				session.getAttribute("type") == null || session.getAttribute("type").equals("normal")) {
			return INPUT;
		}
		return SUCCESS;
	}

}
